TOPDIR := ./
#CC = gcc

OBJS_SERVER := common/socket_epool.o server/proxy_server.o  common/socket_packet.o
OBJS_CLIENT := common/socket_epool.o client/proxy_client.o common/socket_packet.o
	
HEADERS := 	signal_process.h
	
SHARED := $(TARGET_DIR)/libshare.a $(TARGET_DIR)/libcjson.a -lm 


CFLAGS	+= -I. $(TARGET_CFLAGS) -I$(TOPDIR)/include
LDFLAGS	+=

# -DTEST_MODE
#LDFLAGS	+= -lshared


all: proxy_server proxy_client

clean:
	rm -f *.o *~ proxy_server proxy_clien ./server/*.o ./client/*.o ./common/*.o
	

install: all
	$(STRIP) proxy_server
	$(STRIP) proxy_client
#	install -D dhcpc.script $(ROOTFSDIR)/usr/share/udhcpc/default.script
#	install -D master $(ROOTFSDIR)/usr/sbin/master
	
proxy_server: $(OBJS_SERVER)  $(LIBMME) $(SHARED)
	$(CC) -o $@ $^ $(LDFLAGS)
	mv proxy_server $(TARGET_DIR)/
	
proxy_client: $(OBJS_CLIENT)  $(LIBMME) $(SHARED)
	$(CC) -o $@ $^ $(LDFLAGS)
	mv proxy_client $(TARGET_DIR)/	



